package com.sctvcloud.dongqu.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ruihang.generalibrary.ui.adapter.BaseHolderAbsAdapter;
import com.ruihang.generalibrary.ui.util.OnItemInternalClick;
import com.sctvcloud.dongqu.R;
import com.sctvcloud.dongqu.application.Constances;
import com.sctvcloud.dongqu.beans.NewsItem;
import com.sctvcloud.dongqu.ui.adapter.holder.CommonFrgHolder;
import com.sctvcloud.dongqu.ui.adapter.holder.SpecialFrgHolder;
import com.sctvcloud.dongqu.ui.util.IListShowData;

import java.util.List;

/**
 * Created by Administrator on 2017/6/23 0023.
 */

public class SpecialFrgAdapter<T extends IListShowData> extends BaseHolderAbsAdapter<NewsItem, SpecialFrgHolder> {
//    private int mTemplate;//1：首条新闻大图其他新闻小图，2：全部新闻大图
//    public static final int VIEW_TYPE_SMALL = 0;
//    public static final int VIEW_TYPE_LARGE = 1;
//    private boolean isAct = false;

    public SpecialFrgAdapter(Context context, List<NewsItem> list, int template) {
        super(context, list);
//        mTemplate = template;
    }

    public void setAct(boolean isAct) {
//        this.isAct = isAct;
    }


    @Override
    public SpecialFrgHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.item_special, parent, false);
        SpecialFrgHolder holder = new SpecialFrgHolder(context, view);
        holder.setType(viewType);
        holder.setInternalClick(this);
        return holder;
    }

    @Override
    public SpecialFrgAdapter setItemInternalClick(OnItemInternalClick itemInternalClick) {
        super.setItemInternalClick(itemInternalClick);
        return this;
    }


}
